﻿//----------------------------------------------------------------
// <copyright file="BLL_AspNet_Roles.cs" >
//    Copyright (c) Wenzy , All rights reserved.
//    author:温正宇 E-Mail:wenzy@tom.com　MyBlog:wenzy.cnblogs.com
//    All rights reserved.
// </copyright>
//----------------------------------------------------------------

using System;
using System.Collections.Generic;
using System.Text;
using MemberShipDAL;
using MemberShipDAL.DataObject;

namespace MemberServerBLL
{
    public class BLL_AspNet_Roles
    {
        /// <summary>
        /// 获得RoleName
        /// </summary>
        /// <param name="roleId"></param>
        /// <returns></returns>
        public string GerRoleNameById(string roleId)
        {
            MemberShipDAL.DataObject.DataMembershipTableAdapters.aspnet_RolesTableAdapter da = new MemberShipDAL.DataObject.DataMembershipTableAdapters.aspnet_RolesTableAdapter();
            return da.QueryRoleName(roleId).ToString();
        }

        /// <summary>
        /// 获得RoleName
        /// </summary>
        /// <param name="roleId"></param>
        /// <returns></returns>
        public string GerRoleIDByName(string roleName)
        {
            MemberShipDAL.DataObject.DataMembershipTableAdapters.aspnet_RolesTableAdapter da = new MemberShipDAL.DataObject.DataMembershipTableAdapters.aspnet_RolesTableAdapter();
            return da.QueryRoleId(roleName).ToString();
        }
    }
}

